﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Objects.DataClasses;
using SCMS.Model;

namespace SCMS.CoreBusinessLogic.TravelAuthorisation
{
    public interface ITravelAuthService
    {
        bool SaveTravalAuth(Model.TravelAuthorization entity, Model.TravelDate TADateEntity);
        bool SaveTravalAuth(Model.TravelAuthorization entity, Model.TravelExpense TAExpenseEntity);
        bool SubmitTAF(Model.TravelAuthorization entity);
        List<TravelDate> GetTAFDates(Guid tafId);
        List<TravelExpense> GetTAFExpenses(Guid tafId);

        string GenerateUniquNumber(CountryProgramme cp);
        Model.TravelAuthorization GetTAFById(Guid TAFId);
        Model.TravelDate GetTAFDateById(Guid TafDateId);
        Model.TravelExpense GetTAFExpenseById(Guid TafExpenseId);
        List<Model.TravelAuthorization> GetTAuthForms(Guid cpId);
        List<Model.TravelAuthorization> GetTravelAuthorizationsForReview(SystemUser currentUser);
        List<Model.TravelAuthorization> GetTravelAuthorizationsForAuth(SystemUser currentUser);
        List<TravelAuthorization> GetTravelAuthorizationsForPosting(Guid countryProgId, SystemUser currentUser);
        void SaveApprovedTAF(TravelAuthorization taf);
        void SaveApprovedTAFDate(TravelDate tafDate);
        void SaveApprovedTAFExpense(TravelExpense tafExpense);
        bool CommitFunds(TravelAuthorization taf);
        bool EffectPosting(TravelAuthorization taf, Staff poster);
        // <summary>
        /// Send notification to requestor and project managers of the affected budget lines
        /// </summary>
        /// <param name="rfa"></param>
        void NotifyAffected(TravelAuthorization taf);
    }
}
